package com.matrix.java.chap_05;
/*
    打印金字塔形的教字
 */
public class Ex5_19 {
    public static void main(String[] args) {
        for (int i = 0; i <= 7; i++) {
            for (int j = 0; j < (7 - i) * 2; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j <i; j++) {
                System.out.print((int) Math.pow(2,j) + " ");
            }
            for (int j = i; j >=0; j--) {
                System.out.print((int) Math.pow(2,j) + " ");
            }
            System.out.println();
        }
    }
}
